% 创建时间：2025-06-20 23:53:57
% 作者：兪馳
clc;
clear;

A=[8,1,6;
    3,5,7;
    4,9,2]; 

B=[16,4,1;
    9,3,1;
    4,2,1];

C=-[1,2,3;
    4,5,6;
    7,8,0]; 

disp('------------------------------------')
X=lyap(A,B,C), 
norm(A*X+X*B+C)
disp('------------------------------------')
x=lyapsym(sym(A),B,C), 
norm(A*x+x*B+C)
disp('------------------------------------')
x=lyapsym(A,B,C), 
norm(A*x+x*B+C), 
X=sylvester(A,B,-C), 
norm(A*X+X*B+C)